package edu.pku.sei.sct.match;

import java.util.Arrays;

import org.eclipse.emf.ecore.EClass;

import choco.kernel.model.variables.integer.IntegerVariable;

public class ObjectIntegerVariable extends IntegerVariable {

	private static final long serialVersionUID = -5187173292177575240L;

	private String scope;
	public String getScope() {
		return scope;
	}

	public ObjectIntegerVariable(String name, String scope,
			EClass type) {
		super(name, emptyValues);
		this.scope = scope;
		this.type = type;
	}

	private EClass type;

	public EClass getType() {
		return type;
	}

	final public static int[] emptyValues = new int[]{};

	public void setDomain(int[] domain) {
		if(domain.length==0) return;
		Arrays.sort(domain);
		this.values = domain;
		this.setLowB(domain[0]);
		this.setUppB(domain[domain.length-1]);
	}
}
